<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>职务信息</title>
</head>
<style type="text/css">
    table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto}
    table, th, td {border: 1px solid darkslategray;padding: 10px}
</style>
<body>

<div style="text-align: center">
    <span style="color: darkslategray; font-size: 30px">欢迎光临！</span>
    <button><a th:href="@{/post/toadd}">添加</a> </button>
    <button><a th:href="@{/employee/findEmployee}">员工管理</a> </button>
    <button><a th:href="@{/department/findDepartment}">部门</a> </button>
    <hr/>
    <table class="list">
        <tr>
            <th>pid</th>
            <th>职务名称</th>
            <th>部门名称</th>
            <th>操作</th>
        </tr>
        <tr th:each="user : ${post}">
            <td th:text="${user.pid}"></td>
            <td th:text="${user.pname}"></td>
            <td th:text="${user.did}"></td>
            <td><a th:href="@{/post/toupdate(id=${user.pid})}">修改</a>
                <a th:href="@{/post/delPost(id=${user.pid})}">删除</a>
            </td>
        </tr>
    </table>
</div>
</body>
</html>